import components from "unplugin-vue-components/vite";
import autoImport from "unplugin-auto-import/vite";
import { VantResolver } from "unplugin-vue-components/resolvers";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import dns from "dns";
dns.setDefaultResultOrder("verbatim");
export default defineConfig({
  plugins: [
    vue(),
    //自动引入ui组件，可自行修改
    components({
      resolvers: [VantResolver()],
    }),
    autoImport({
      imports: ["vue", "vue-router"],
      dts: "src/auto-import.d.ts",
    }),
  ],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
  server: {
    port: 5445,
  },
});
